package com.mmy.service.impl.hotel;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mmy.dao.hotel.VHotelPlanRepository;
import com.mmy.domain.hotel.VHotelPlan;
import com.mmy.service.hotel.VHotelPlanService;

@Service
public class VHotelPlanServiceImpl implements VHotelPlanService {
	@Autowired
	private VHotelPlanRepository vHotelPlanRepository;

	/* 查找所有酒店计划 */
	public List<VHotelPlan> findAll() {
		// TODO Auto-generated method stub
		return vHotelPlanRepository.findAll();
	}

	/* 查找该计划编号的计划 */
	public VHotelPlan findByPlanID(int iPlanID) {
		// TODO Auto-generated method stub
		return vHotelPlanRepository.findByPlanID(iPlanID);
	}

	/* 查询在这些房间编码里的计划 */
	public List<VHotelPlan> findByRoomIDs(List<Integer> lstRoomID) {
		// TODO Auto-generated method stub
		return vHotelPlanRepository.findByRoomIDs(lstRoomID);
	}

	/**
	 * 通过Roomid查找
	 * 
	 * @param
	 * @return
	 */
	public List<VHotelPlan> findByRoomID(int iRoomID) {
		// TODO Auto-generated method stub
		return vHotelPlanRepository.findByRoomID(iRoomID);
	}

	/* 查找所有计划中的最小价格的计划 */
	public List<VHotelPlan> findAllMin() {
		// TODO Auto-generated method stub
		return vHotelPlanRepository.findAllMin();
	}

	/* 查询房间的当前日期的计划 */
	public List<VHotelPlan> findAllNow() {
		// TODO Auto-generated method stub
		return vHotelPlanRepository.findAllNow();
	}

}
